<?php
/**
 * Created by PhpStorm.
 * User: ls721
 * Date: 2016/10/27 0027
 * Time: 20:34
 */class Domain_FirstAddTips{

    public function getTips($tips_id){
        $rs=array();
        $model=new Model_FirstAddTips;
        if(empty($tips_id)){
            return $model->getAllTips();
        }else{
            return $model->getTips($tips_id);
        }
    }

    public function setTips($tips_id,$tips)
    {
        $model=new Model_FirstAddTips();
        if(empty($tips_id)){
            $Tid=uniqid('T');
            $model->insert(array('id'=>$Tid,'FirstAddTips'=>$tips));
            return $model->getTips($Tid);
        }else{
            $model->update($tips_id,array('FirstAddTips'=>$tips));
            return $model->getTips($tips_id);
        }

    }
}